{extend name="common/menu_child" /}

{block name="nav"}
<span class="layui-breadcrumb">
	<a>系统设置</a>
	<a href="{:url('index')}">基本信息</a>
	<a><cite>编辑内容</cite></a>
</span>
{/block}

{block name="body"}
<form class="layui-form">
	<div class="layui-form-item">
		<label class="layui-form-label"><span class="x-red">*</span>内容</label>
		<div class="layui-input-inline">
			<input type="text" name="content" lay-verify="required" maxlength="20" value="{$setting.value}" autocomplete="off" placeholder="请输入内容" class="layui-input" />
		</div>
		<div class="layui-form-mid layui-word-aux"></div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"></label>
		<button  class="layui-btn" lay-filter="save" lay-submit>保存</button>
	</div>
</form>
{/block}

{block name="javascript"}
<script type="text/javascript">

	layui.use(['form', 'layer', 'upload'], function(){
		
		layui.form.on('submit(save)', function(e){
			
			let data = {
				content: e.field.content
			};
			action_post_json('', data, function(response){
				layer.msg(response.message);
				switch(response.errno){
					case 0 :
						setTimeout(function(){
							window.location.href='{:url("index")}';
						}, 1000);
						break;
				};
			});
		
			return false;
		});
	});
	
	
</script>
{/block}